<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<title>管理控制台</title>
	<script type="text/javascript" src="../js/boot.js"></script>
	<script type="text/javascript" src="../js/dashboard.js"></script>
	<link rel="stylesheet" href="../css/frame/frame-left.css">
</head>

<body>
	<div class="frame">
		<!-- 顶部 -->
		<div class="frame-top">
			<!-- 顶部左边部分 -->
			<div class="frame-top-left">
				<!-- LOGO -->
				<div class="frame-top-logo">
					<!--<img src="../img/frame/frame-left/logo.png" />-->
				</div>
			</div>
			<!-- 顶部右边部分 -->
			<div class="frame-top-right">
				<!-- 当前时间 -->
				<div class="frame-top-time">
					<img src="../../img/frame/frame-left/time.png" />
					<span>当前时间：</span><span id="datetime_"></span>
				</div>
				<!-- 当前用户 -->
				<div class="frame-top-userinfo">
					<img id="username" src="../../img/frame/frame-left/user.png" />
				</div>
				<!-- 全屏按钮 -->
				<div class="frame-top-fullscreen">
					<img id="fullScreen_open" onclick="FullScreen.open()" src="../../img/frame/frame-left/fullscreen_open.png" title="全屏" />
					<img id="fullScreen_closed" style="display: none;" onclick="FullScreen.closed()" src="../../img/frame/frame-left/fullscreen_closed.png"
						title="关闭全屏" />
				</div>
				<!-- 退出登录 -->
				<div class="frame-top-loginout">
					<img onclick="location.href='${ctx}/loginOut.do?ip=<%=ip %>'" src="../../img/frame/frame-left/loginOut.png" title="退出登录" />
				</div>
			</div>
		</div>
		<!-- 左侧菜单 -->
		<div class="frame-left">
			<div class="frame-left-guide">
				<b>菜单导航</b>
				<img onClick="FrameMenu.hideMenu()" src="../../img/frame/frame-left/guide.png" title="菜单导航" />
			</div>
			<!-- 自定义菜单 -->
			<ul id="menu" class="frame-menu"></ul>
		</div>
		<!-- 中间主区域 -->
		<div class="frame-center">
			<!-- tab页签 -->
			<div id="main-tab" class="mini-tabs" contextMenu="#tabsMenu" activeIndex="0" style="width: 100%; height: 100%;" arrowPosition="side"
				showCloseButton="true" showNavMenu="true">
			</div>
			<!-- 页签上的右键菜单 -->
			<ul id="tabsMenu" class="mini-contextmenu" onbeforeopen="FrameTab.onBeforeOpen">
				<li onclick="FrameTab.closeTab">关闭当前标签页</li>
				<li onclick="FrameTab.closeAllBut">关闭其他标签页</li>
				<li onclick="FrameTab.closeAll">关闭所有标签页</li>
			</ul>
		</div>
		<!--底部-->
		<div class="frame-bottom">
			&copy;版权所有：fgg047
		</div>
	</div>
	<script type="text/javascript">
		mini.parse();
		// 从localStorage中获取token数据和用户信息
		var obj = localStorage.getItem('user');
		if (obj) {
			var user = mini.decode(obj);
			//$(selector).html(content)
			$("#username").after(user.userName);
			window.currentUser = user;
		}

		var menu = [
			{
				"label": "系统管理", "path": "/admin",
				"children": [
					{ "icon": null, "label": "在线用户", "path": "/admin/system/online_user_list.html" },
					{ "icon": null, "label": "网页路径", "path": "/admin/system/web_path.html" },
					{ "icon": null, "label": "启动参数", "path": "/admin/system/start_list.html" },
					{ "icon": null, "label": "菜单管理", "path": "/admin/system/menu_list.html" },
					{ "icon": null, "label": "字典管理", "path": "/admin/system/dic_list.html" },
					{ "icon": null, "label": "任务管理", "path": "/admin/system/task_list.html" }
				]
			},
			{
				"icon": null, "label": "数据库管理", "path": "/admin/database/",
				"children": [
					{ "icon": null, "label": "连接管理", "path": "/admin/database/database_list.html" },
					{ "icon": null, "label": "表管理", "path": "/admin/database/table_list.html" },
					{ "icon": null, "label": "视图管理", "path": "/admin/database/view_list.html" },
					{ "icon": null, "label": "类管理", "path": "/admin/database/class_list.html" }
				]
			},
			{
				"icon": null,
				"label": "微信管理",
				"path": "//admin/weixin",
				"children": [
					{ "icon": null, "label": "微信配置", "path": "/admin/weixin/config_list.html" },
					{ "icon": null, "label": "微信菜单", "path": "/admin/weixin/menu_list.html" }
				]
			},
			{
				"icon": null, "label": "代码生成", "path": "/page/",
				"children": [
					{ "icon": null, "label": "页面管理", "path": "/admin/code/page_list.html" },
					{ "icon": null, "label": "页面编辑", "path": "/admin/code/window_edit.html" }
				]
			}];
		//生成菜单(传参：菜单控件ID；IP；菜单图标的路径，以“/”结尾。不同的分支如果框架页不同，菜单图标的路径也不同)
		FrameMenu.initial("menu", menu, ctx + "/img/frame/menu-demo/");
		//设置系统时间(传参：时间控件ID)
		FrameTime.initial("datetime_");
		//初始化Tab(传参：mini-tab的ID)
		FrameTab.initial("main-tab");
		//加载首页。如果系统资源中配置了首页，则优先加载已配置的首页。否则，加载此处的首页！
		FrameTab.showHomePage(ctx + "/page/main.html");
	</script>
</body>

</html>